package com.google.gwt.maps.v3.client.streetview;

import com.google.gwt.core.client.JavaScriptObject;
import com.google.gwt.maps.v3.client.HasNavigationControlOptions;
import com.google.gwt.maps.v3.client.NavigationControlOptions;
import com.google.gwt.maps.v3.client.base.HasLatLng;
import com.google.gwt.maps.v3.client.base.LatLng;
import com.google.gwt.maps.v3.client.impl.ControlPositionImpl;
import com.google.gwt.maps.v3.client.impl.NavigationControlStyleImpl;
import com.google.gwt.maps.v3.client.streetview.impl.StreetViewPanoramaOptionsImpl;

public class StreetViewPanoramaOptions implements HasStreetViewPanoramaOptions {

  private JavaScriptObject jso;

  public static final StreetViewPanoramaOptionsImpl impl = StreetViewPanoramaOptionsImpl.impl;

  public StreetViewPanoramaOptions(JavaScriptObject jso) {
    this.jso = jso;
  }

  public StreetViewPanoramaOptions() {
    this(impl.construct());
  }

  @Override
  public HasStreetViewAddressControlOptions getAddressControlOptions() {
    return new StreetViewAddressControlOptions(impl.getAddressControlOptions(jso));
  }

  @Override
  public HasNavigationControlOptions getNavigationControlOptions() {
    return new NavigationControlOptions(impl.getNavigationControlOptions(jso),
        new ControlPositionImpl(), new NavigationControlStyleImpl());
  }

  @Override
  public String getPano() {
    return impl.getPano(jso);
  }

  @Override
  public HasLatLng getPosition() {
    return new LatLng(impl.getPosition(jso));
  }

  @Override
  public HasStreetViewPov getPov() {
    return new StreetViewPov(impl.getPov(jso));
  }

  @Override
  public boolean isAddressControl() {
    return impl.isAddressControl(jso);
  }

  @Override
  public boolean isEnableCloseButton() {
    return impl.isEnableCloseButton(jso);
  }

  @Override
  public boolean isLinksControl() {
    return impl.isLinksControl(jso);
  }

  @Override
  public boolean isNavigationControl() {
    return impl.isNavigationControl(jso);
  }

  @Override
  public void setAddressControl(boolean addressControl) {
    impl.setAddressControl(jso, addressControl);
  }

  @Override
  public void setAddressControlOptions(
      HasStreetViewAddressControlOptions addressControlOptions) {
    impl.setAddressControlOptions(jso, addressControlOptions.getJso());
  }

  @Override
  public void setEnableCloseButton(boolean enableCloseButton) {
    impl.setEnableCloseButton(jso, enableCloseButton);
  }

  @Override
  public void setLinksControl(boolean linksControl) {
    impl.setLinksControl(jso, linksControl);
  }

  @Override
  public void setNavigationControl(boolean navigationControl) {
    impl.setNavigationControl(jso, navigationControl);
  }

  @Override
  public void setNavigationControlOptions(
      HasNavigationControlOptions navigationControlOptions) {
    impl.setNavigationControlOptions(jso, navigationControlOptions.getJso());
  }

  @Override
  public void setPano(String pano) {
    impl.setPano(jso, pano);
  }

  @Override
  public void setPosition(HasLatLng position) {
    impl.setPosition(jso, position.getJso());
  }

  @Override
  public void setPov(HasStreetViewPov pov) {
    impl.setPov(jso, pov.getJso());
  }

  @Override
  public JavaScriptObject getJso() {
    return jso;
  }

}
